package cn.snow.boot.rabbitmq.receive;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author Wanxiang Liu
 * @version 2018/9/15.
 */
@Component
@RabbitListener(queues = "email")
public class Receiver2 {

    @RabbitHandler
    public void handle(String msg) {
        System.err.println("Receiver2: " + msg);
    }

    @RabbitHandler
    public void handle(Long msg) {
        System.err.println("Receiver2: " + msg);
    }

}
